package com.example.activitiescustom;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import android.provider.BaseColumns;

public class GameResultsDbHelper extends SQLiteOpenHelper 
        implements BaseColumns {
    
    

	public static final String TABLE_NAME = "game_results";
    public static final String NAME = "gamer_name";
    public static final String SCORE = "game_result";
    
    public GameResultsDbHelper(Context context) {
        super(context, ResultsProvider.DB_GameResults, null, 1);
    }
    
    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE " + TABLE_NAME 
                + " (_id INTEGER PRIMARY KEY AUTOINCREMENT, " 
                + NAME + " TEXT, " + SCORE + " TEXT);");
        
       // ContentValues values = new ContentValues();
                      
      //  values.put(NAME, "Jacob Anderson");
      //  values.put(PHONE, "412412411");
     //   db.insert(TABLE_NAME, NAME, values);  
        
      
    }

    
    @Override
    public void onUpgrade(
            SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
        onCreate(db);
    }   
}